<%--
  Created by IntelliJ IDEA.
  User: zjy
  Date: 2015/4/13
  Time: 16:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools"/>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:1px;">
    <t:datagrid name="tdIscenterList" title="" actionUrl="compSuggController.do?datagrid"
                idField="id" fit="true" queryMode="group" sortOrder="desc" sortName="createTime">
      <t:dgCol title="id" field="id" hidden="true"></t:dgCol>
      <t:dgCol title="投诉建议内容" field="content" query="true"  width="200"></t:dgCol>
      <t:dgCol title="投诉来源系统" field="sourceSys"  query="true" dictionary="supportSys"  width="50"></t:dgCol>
      <t:dgCol title="投诉人" field="complainant"  query="true" width="50"></t:dgCol>
      <t:dgCol title="投诉人联系电话"  field="phone"  query="true" width="50"></t:dgCol>
      <t:dgCol title="投诉人联系QQ" field="qq" width="50"></t:dgCol>
      <t:dgCol title="创建时间"  formatter="yyyy-MM-dd hh:mm:ss" field="createTime"  width="80"></t:dgCol>

      <t:dgCol title="common.operation" field="opt" width="50"></t:dgCol>
      <t:dgDelOpt operationCode="deleteCompSugg"  url="compSuggController.do?delCompSugg&id={id}" title="删除"></t:dgDelOpt>

      <%--<t:dgToolBar title="新增" icon="icon-add" url="articleController.do?addorupdate" funname="add" width="800" height="600"></t:dgToolBar>--%>
      <%--<t:dgToolBar title="修改" icon="icon-edit" url="articleController.do?addorupdate" funname="update"  width="800" height="600"></t:dgToolBar>--%>
      <%--<t:dgToolBar title="发布通告" langArg="common.user" icon="icon-edit" url="articleController.do?publish" funname="publish" ></t:dgToolBar>--%>
      <%--<t:dgToolBar title="预览" langArg="common.user" icon="icon-search" url="articleController.do?preview&id=" funname="f_openPreview"  width="850" height="600"></t:dgToolBar>--%>
      <t:dgToolBar operationCode="viewCompSugg" title="查看" icon="icon-search" url="compSuggController.do?addorupdate" funname="detail"  width="800" height="400"></t:dgToolBar>
    </t:datagrid>
  </div>
</div>
<script type="text/javascript">



  function f_openPreview(title,url,gname,width,height){


    var rowsData = $('#'+gname).datagrid('getSelections');
    if (!rowsData || rowsData.length==0) {
    tip('请选择要预览的公告');
    return;
    }
    if (rowsData.length>1) {
    tip('请选择一条记录预览');
    return;
    }

    url += rowsData[0].id;

    openwindow(title + "[" + rowsData[0].title + "]", url ,gname,width,height);

  }
</script>
